Page({
  onLoad({ id }) {
    this.getHouseDetail(id)
  },
  async getHouseDetail(id) {
    const { code, data: houseDetail } = await wx.http.get(`/room/${id}`)
    if (code !== 10000) return wx.utils.toast('查询房屋失败请重试')
    this.setData({ houseDetail })
  },
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.data.houseDetail.id,
    })
  },
})
